package com.example.demo.NiuKe.v11;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        String s1="";
        while ((str = br.readLine())!=null){
            String[]s = str.split(" ");
            for (int i = s.length-1;i>=0;i--){
                s1 = s1+s[i]+" ";
            }
            System.out.println(s1);
        }
    }
}
